package com.zw.design.pattern.creational.prototype;

import java.text.MessageFormat;

public class MailUtil {


    public static void sendMail(Mail mail){
        String context="学习{0}同学，邮件地址:{1},邮件内容{2}发送邮件成功";
        System.out.println(MessageFormat.format(context,mail.getName(),mail.getEmailAddress(),mail.getContent()));
    }

    public static  void saveOrigin(Mail mail){
        System.out.println("mail = 保存原始邮件记录 " + mail);
    }
}
